<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script type="text/javascript" src="../js/vue.js"></script>
</head>

<body>
    <div id="root">
        <h2 v-once>初始化的n值:{{n}}</h2>
        <h2 v-pre="">当前的n值:{{n}}</h2>
        <button @click="n++">点我n+1</button>
    </div>


    <script type="text/javascript">
        new Vue({
            el: '#root',
            data: {
                n: 1
            }
        })



    </script>
</body>

</html>